package com.odais.Reservation;

import java.util.ArrayList;

import android.R.integer;

/**
 *
 * @author Lionel DECELLE
 * @since 12 juin 2012 - 16:52:59
 *
 */
public class ReservationEntityListsHandler
{
// ===========================================================
// Constants
// ===========================================================

// ===========================================================
// Fields
// ===========================================================

private ArrayList<ReservationEntity> reservationEntityArrayList;
private ArrayList<ReservationBox> reservationBoxLeftPanelArrayList, reservationBoxRightPanelArrayList;

// ===========================================================
// Constructors
// ===========================================================

public ReservationEntityListsHandler(ArrayList<ReservationEntity> reservationEntityArrayList) {

	this.reservationEntityArrayList = reservationEntityArrayList;
	this.reservationBoxLeftPanelArrayList = new ArrayList<ReservationBox>();
	this.reservationBoxRightPanelArrayList = new ArrayList<ReservationBox>();
}

// ===========================================================
// Getter & Setter
// ===========================================================


public ArrayList<ReservationEntity> getReservationEntityArrayList() {
	return reservationEntityArrayList;
}

public ArrayList<ReservationBox> getReservationBoxLeftPanelArrayList() {
	reservationBoxLeftPanelArrayList.clear();
	for(int i=0; i<reservationEntityArrayList.size(); i++)
	{
		reservationBoxLeftPanelArrayList.add(reservationEntityArrayList.get(i).getReservationBox_LeftPanel());
	}
	
	return reservationBoxLeftPanelArrayList;
}

public ArrayList<ReservationBox> getReservationBoxRightPanelArrayList() {
	reservationBoxRightPanelArrayList.clear();
	for(int i=0; i<reservationEntityArrayList.size(); i++)
	{
		reservationBoxRightPanelArrayList.add(reservationEntityArrayList.get(i).getReservationBox_RightPanel());
	}
	return reservationBoxRightPanelArrayList;
}

public void Refresh()
{	
	reservationBoxLeftPanelArrayList.clear();
	for(int i=0; i<reservationEntityArrayList.size(); i++)
	{
		reservationBoxLeftPanelArrayList.add(reservationEntityArrayList.get(i).getReservationBox_LeftPanel());
	}
	reservationBoxRightPanelArrayList.clear();
	for(int i=0; i<reservationEntityArrayList.size(); i++)
	{
		reservationBoxRightPanelArrayList.add(reservationEntityArrayList.get(i).getReservationBox_RightPanel());
	}
	
}

// ===========================================================
// Methods for/from SuperClass/Interfaces
// ===========================================================

	


}